package com.voice.call.exception;

import com.voice.call.common.ConstLang;
import com.voice.call.common.ResultEnum;



@SuppressWarnings("serial")
public class CommonException  extends RuntimeException{
	private int code;
	private String msg;
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public CommonException(ResultEnum rstEnum){
		super(rstEnum.getMsg());
		this.code = rstEnum.getCode();
		this.msg = rstEnum.getMsg();
	}
	public CommonException(ResultEnum rstEnum,String lang){
		super(rstEnum.getMsg());
		this.code = rstEnum.getCode();
		this.msg = ConstLang.getMessage(rstEnum.toString(), lang);
	}
	public CommonException(int code, String msg) {
		super(msg);
		this.code = code;
		this.msg = msg;
	}
	
}
